package com.six.vo;

import java.sql.Date;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * 业务单
 * 
 */
@Entity
@Table(name="WMS_T_BILL")
public class Bill {
	private int billID; //VARCHAR(16) 业务单系统编号
	private String billFeeItem; //VARCHAR(16) 业务类型
	private String billState; //VARCHAR(16) 单据状态
	private Date billDate; //DATE 业务发生时间
	private String billCode; //NCHAR(13) 单据可视编号
	private String billType; //VARCHAR(16) 业务类型
	private String billNote; //NVARCHAR2(512) 备注
	private String billAdviceSite; //NVARCHAR2(60) 推荐仓位(精确到库区)
	private double billFeeTruckage; //NUMBER(30,2) 力资费
	private double billFeeStore; //NUMBER(30,2) 库存费
	private double billFeeOther; //NUMBER(30,2) 其他费用
	private double billPayable; //NUMBER(30,2) 应付款
	private double billPaid; //NUMBER(30,2) 实收款
	private Date billEditTime; //DATE 最后编辑时间
	private int billIsDel; //SMALLINT 是否已被删除
	private User billTransactor;
	private Customer customer;
	private Set<BillDetail> billDetail;
	
	public Bill() {
		super();
	}
	public Bill(int billID, String billFeeItem, String billState,
			Date billDate, String billCode, String billType, String billNote,
			String billAdviceSite, double billFeeTruckage, double billFeeStore,
			double billFeeOther, double billPayable, double billPaid,
			Date billEditTime, int billIsDel, User billTransactor,
			Customer customer, Set<BillDetail> billDetail) {
		super();
		this.billID = billID;
		this.billFeeItem = billFeeItem;
		this.billState = billState;
		this.billDate = billDate;
		this.billCode = billCode;
		this.billType = billType;
		this.billNote = billNote;
		this.billAdviceSite = billAdviceSite;
		this.billFeeTruckage = billFeeTruckage;
		this.billFeeStore = billFeeStore;
		this.billFeeOther = billFeeOther;
		this.billPayable = billPayable;
		this.billPaid = billPaid;
		this.billEditTime = billEditTime;
		this.billIsDel = billIsDel;
		this.billTransactor = billTransactor;
		this.customer = customer;
		this.billDetail = billDetail;
	}
	@Id
	@GeneratedValue
	public int getBillID() {
		return billID;
	}
	public void setBillID(int billID) {
		this.billID = billID;
	}
	public String getBillFeeItem() {
		return billFeeItem;
	}
	public void setBillFeeItem(String billFeeItem) {
		this.billFeeItem = billFeeItem;
	}
	public String getBillState() {
		return billState;
	}
	public void setBillState(String billState) {
		this.billState = billState;
	}
	public Date getBillDate() {
		return billDate;
	}
	public void setBillDate(Date billDate) {
		this.billDate = billDate;
	}
	public String getBillCode() {
		return billCode;
	}
	public void setBillCode(String billCode) {
		this.billCode = billCode;
	}
	public String getBillType() {
		return billType;
	}
	public void setBillType(String billType) {
		this.billType = billType;
	}
	public String getBillNote() {
		return billNote;
	}
	public void setBillNote(String billNote) {
		this.billNote = billNote;
	}
	public String getBillAdviceSite() {
		return billAdviceSite;
	}
	public void setBillAdviceSite(String billAdviceSite) {
		this.billAdviceSite = billAdviceSite;
	}
	public double getBillFeeTruckage() {
		return billFeeTruckage;
	}
	public void setBillFeeTruckage(double billFeeTruckage) {
		this.billFeeTruckage = billFeeTruckage;
	}
	public double getBillFeeStore() {
		return billFeeStore;
	}
	public void setBillFeeStore(double billFeeStore) {
		this.billFeeStore = billFeeStore;
	}
	public double getBillFeeOther() {
		return billFeeOther;
	}
	public void setBillFeeOther(double billFeeOther) {
		this.billFeeOther = billFeeOther;
	}
	public double getBillPayable() {
		return billPayable;
	}
	public void setBillPayable(double billPayable) {
		this.billPayable = billPayable;
	}
	public double getBillPaid() {
		return billPaid;
	}
	public void setBillPaid(double billPaid) {
		this.billPaid = billPaid;
	}
	public Date getBillEditTime() {
		return billEditTime;
	}
	public void setBillEditTime(Date billEditTime) {
		this.billEditTime = billEditTime;
	}
	public int getBillIsDel() {
		return billIsDel;
	}
	public void setBillIsDel(int billIsDel) {
		this.billIsDel = billIsDel;
	}
	@ManyToOne(cascade={CascadeType.ALL})           
    @JoinColumn(name="billTransactor") 	 //VARCHAR(16) 结算员编号
	public User getBillTransactor() {
		return billTransactor;
	}
	public void setBillTransactor(User billTransactor) {
		this.billTransactor = billTransactor;
	}
	@ManyToOne(cascade={CascadeType.ALL})           
    @JoinColumn(name="customerID") 	 //VARCHAR(16) 货主编号
	public Customer getCustomer() {
		return customer;
	}
	public void setCustomer(Customer customer) {
		this.customer = customer;
	}
	@OneToMany(cascade=CascadeType.ALL)
	public Set<BillDetail> getBillDetail() {
		return billDetail;
	}
	public void setBillDetail(Set<BillDetail> billDetail) {
		this.billDetail = billDetail;
	}
	

}
